#!/bin/bash
HOST=$1
USER=$2
PASS=$3
CYCLENUM=1
LOCALROOTDIR=/home/ipnet/mystope/data
LOCALCURDATE=`date +%Y/%m/%d`
LOCALCURDIR=$LOCALROOTDIR
mkdir $LOCALCURDIR
echo $LOCALCURDIR
REMOTEROOTDIR=/home/lianc/topn
REMOTECURDIR=$REMOTEROOTDIR/$LOCALCURDATE

ftp -n<<!
open $HOST
user $USER $PASS
bin
cd $REMOTECURDIR
lcd $LOCALCURDIR
prompt
mget *
close
bye
!